<?php
session_start();
include("../service/userService.php");
$username = $_POST['username'];
$password = $_POST['password'];
if (authenticateUser($username, md5($password), 0) == true) {
	$user = mysql_fetch_array(findUserBy($username));
	$_SESSION['username'][0] = $user['USER_ID'];
	$_SESSION['username'][1] = $user['USER_NAME'];
	echo 'y';
} else {
	echo 'n';
}

?>